package com.ruoyi.system.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.system.domain.LanguageValue;
import com.ruoyi.system.domain.params.LanguageValueParams;
import com.ruoyi.system.domain.vo.LanguageValueVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 语言键值Service业务层处理
 *
 * @author huyafang
 * @date 2023-03-06
 */

public interface ILanguageValueService {


    /**
     * 查询语言键值列表
     *
     * @param languageValueConditionDto 语言键值
     * @return 语言键值
     */
    public IPage<LanguageValueVo> queryList(Page<LanguageValueVo> page, LanguageValueParams languageValueConditionDto);

    /**
     * 新增语言键值
     *
     * @param languageValue 语言键值
     * @return 结果
     */
    public LanguageValue save(LanguageValue languageValue);

    /**
     * 修改语言键值
     *
     * @param languageValue 语言键值
     * @return 结果
     */
    public int update(LanguageValue languageValue);


    /**
     * 新增修改语言键值
     *
     * @param languageValueVoList 语言键值list
     * @return
     */
    public void addUpdateData(List<LanguageValueVo> languageValueVoList);

    /**
     *
     * @param newKeyList
     * @param sysUsername
     */
    public void updateAllLanguageKey(List<LanguageValueVo> newKeyList, String sysUsername);

    /**
     * 批量删除KEY
     *
     * @param keys key数组
     * @return
     */
    public void deleteByKey(String[] keys);

    LanguageValue getById(Long id);

    int updateLanguageKey(String oldCode, String newCode, String username);
}
